package models

import "time"

// Community 社区表
type Community struct {
	CommunityId   uint64	 `json:"community_id" gorm:"community_id"`
	CommunityName string	 `json:"community_name" gorm:"community_name"`
	Introduction  string	 `json:"introduction" gorm:"introduction"`
	CreateTime    time.Time	 `json:"create_time" gorm:"create_time"`
	UpdateTime	  time.Time	 `json:"update_time" gorm:"update_time"`
}
func (*Community) TableName() string{
	return "community"
}

// CommunityDetailRes 社区详情model
type CommunityDetailRes struct {
	CommunityID   uint64    `json:"community_id" gorm:"community_id"`
	CommunityName string    `json:"community_name" gorm:"community_name"`
	Introduction  string    `json:"introduction,omitempty" gorm:"introduction"` // omitempty 当Introduction为空时不展示
	CreateTime    time.Time `json:"create_time" gorm:"create_time"`
}

// CommunityList 查询分类社区列表
type CommunityList struct {
	CommunityID   uint64    `json:"community_id" db:"community_id"`
	CommunityName string    `json:"community_name" db:"community_name"`
}
